#pragma once

enum MESHTYPE{MESH_POINTS=1,MESH_LINES=2,MESH_TRIANGLES=4,MESH_QUADS=8};
enum MESHSEMANTIC{MESH_COLOR=1,MESH_TEXCOORD=2,MESH_NORMAL=4,MESH_TANGENT=8,MESH_BINORMAL=116};

/**
* Base class for generated meshes, such as boxes, spheres,
* cylinders, cones, ....
* @author Koen Samyn
*/
class Mesh
{
public:
	/**
	* Creates a new mesh object with the provided mesh type flags.
	* @param meshType the type to create, for example : MESH_POINTS, MESH_LINES, MESH_TRIANGLES, MESH_QUADS
	* @param meshSemanticFlags a combination of mesh semantic flags.
	*/
	Mesh(MESHTYPE type,int meshSemanticFlags);
	/**
	* Deletes the mesh object
	*/
	~Mesh(void);
	/**
	* Checks if this mesh should create a point list.
	* @return true if the mesh should create a point list, false otherwise.
	*/
	bool CreatePoints(){
		return (m_MeshType & MESH_POINTS)>0;

	}
	/**
	* Checks if this mesh should create a line list.
	* @return true if the mesh should create a point list, false otherwise.
	*/
	bool CreateLines(){
		return (m_MeshType & MESH_LINES)>0;
	}
	/**
	* Checks if this mesh should create a triangle list.
	* @return true if the mesh should create a point list, false otherwise.
	*/
	bool CreateTriangles(){
		return (m_MeshType & MESH_TRIANGLES)>0;
	}
	/**
	* Checks if this mesh should create a quad list.
	* @return true if the mesh should create a point list, false otherwise.
	*/
	bool CreateQuads(){
		return (m_MeshType & MESH_QUADS)>0;
	}
	/**
	* Checks if this mesh should create normals.
	* @return true if the mesh should create normals, false otherwise.
	*/
	bool CreateNormals(){
		return (m_MeshSemanticFlags & MESH_NORMAL)>0;
	}
	/**
	* Checks if this mesh should create colors.
	* @return true if the mesh should create normals, false otherwise.
	*/
	bool CreateColors(){
		return (m_MeshSemanticFlags & MESH_COLOR)>0;
	}
	/**
	* Checks if this mesh should create tangent information.
	* @return true if the mesh should create normals, false otherwise.
	*/
	bool CreateTangents(){
		return (m_MeshSemanticFlags & MESH_TANGENT)>0;
	}
	/**
	* Checks if this mesh should create binormal information.
	* @return true if the mesh should create binormal information, false otherwise.
	*/
	bool CreateBinormals(){
		return (m_MeshSemanticFlags & MESH_BINORMAL)>0;
	}

	

protected:
	int m_MeshType;
	int m_MeshSemanticFlags;
private:
	// -------------------------
	// Disabling default copy constructor and default assignment operator.
	// If you get a linker error from one of these functions, your class is internally trying to use them. This is
	// an error in your class, these declarations are deliberately made without implementation because they should never be used.
	// -------------------------
	Mesh(const Mesh& t);
	Mesh& operator=(const Mesh& t);
};

